package com.xinqi.modules.course.course.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 班级（加课码）状态
 *
 * @author linkai
 * @date 2023/1/17
 */
@Describe("班级(加课码)状态")
public enum ClassStatusEnum implements BaseEnum {
    NORMAL("NORMAL", "正常"),

    DISABLE("DISABLE", "停用");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    ClassStatusEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static ClassStatusEnum of(String code) {
        return BaseEnum.of(ClassStatusEnum.class, code);
    }
}
